import request from '@/utils/request'

// 查询学习库列表
export function listLearn(query) {
  return request({
    url: '/customer/learn/list',
    method: 'get',
    params: query
  })
}

// 查询学习库详细
export function getLearn(learnId) {
  return request({
    url: '/customer/learn/' + learnId,
    method: 'get'
  })
}

// 新增学习库
export function addLearn(data) {
  return request({
    url: '/customer/learn',
    method: 'post',
    data: data
  })
}

// 修改学习库
export function updateLearn(data) {
  return request({
    url: '/customer/learn',
    method: 'put',
    data: data
  })
}

// 删除学习库
export function delLearn(learnId) {
  return request({
    url: '/customer/learn/' + learnId,
    method: 'delete'
  })
}
